package com.wyg.blog.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wyg.blog.model.blog.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommentMapper {
    IPage<Comment> getSomeComments(Page<?> page);

    List<Comment> getCommentsByBid(Integer bid);

    Comment getCommentById(Integer id);

    Integer getCommentCountByBid(Integer bid);

    String getContentById(Integer id);

    boolean addComment(Comment comment);

    boolean updateCommentState(@Param("id") Integer id, @Param("state") boolean state);

    boolean updateComment(@Param("id") Integer id, @Param("content") String content);

    boolean deleteComment(Integer id);

    String getEmailById(Integer id);

    boolean getStateById(Integer id);
}
